<!DOCTYPE html>

<html lang="en">
	
	<head>
		
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Seminario de Ing. Informatica I (75.71)">
		<meta name="user" content="login" />
		
		<title>Kiosco Deal</title>
	
		<!-- Core CSS - Include with every page -->    
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap.min.css')}" type="text/css">
		<link rel="stylesheet" href="${resource(dir: 'font-awesome/css', file: 'font-awesome.css')}" type="text/css">
	
	
	    <!-- Page-Level Plugin CSS - Dashboard --> 
	    <link rel="stylesheet" href="${resource(dir: 'css/plugins/morris', file: 'morris-0.4.3.min.css')}" type="text/css">
	    <link rel="stylesheet" href="${resource(dir: 'css/plugins/timeline', file: 'timeline.css')}" type="text/css">
	
	    <!-- SB Admin CSS - Include with every page -->
		<link rel="stylesheet" href="${resource(dir: 'css', file: 'sb-admin.css')}" type="text/css">		
		<g:javascript library="jquery-1.11.1"/>
		<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
		 
		
		<plugin:isAvailable name="jquery 1.11.1"></plugin:isAvailable>
		<g:layoutHead/>
		
	</head>
	
	
	
	
	<body>
		
	<div id="wrapper">
		<!-- Fixed navbar -->
		<div class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">			
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
					<span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="${createLink(uri: '/')}"><img src="${resource(dir: 'images', file: 'logo.png')}" alt="Kiosco Deal" style="height: 58px; width: 150px"/></a>
			</div>
			
			<div class="navbar-collapse collapse">
				<ul class="nav navbar-top-links navbar-right">					
					<li class="dropdown user-dropdown">
						<a href="${createLink(uri: '/user/create')}" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-pencil"></i> Registrarse</a>			    
				    </li>
				            			
		           	<li class="dropdown user-dropdown">            	
        				<g:loginControl />
		           	</li>
		           	
		           	 <g:if test="${session.user}">
					   <li>
					   		<a href="${createLink(action:'logout', controller:'user')}"><i class="fa fa-power-off"></i> Log Out</a>
					   </li>
					</g:if>				
				</ul>
			</div>
			<!--/.nav-collapse -->			
		</div>
	
		<div class="navbar-default navbar-static-side" role="navigation">
			<div class="sidebar-collapse">
	                <ul class="nav" id="side-menu">	                 
	                    <li>
	                        <a href="${createLink(uri: '/')}"><i class="fa fa-home"></i> Inicio</a>
	                    </li>
	                    
	                    <g:if test="${session?.user?.role?.value == 'user'}">							
		                    <li>
		                    	<a href="${createLink(uri: '/user/cuenta')}"><i class="fa fa-user"></i> Cuenta</a>
		                    </li>	                    
	                    </g:if>	 
	                    
	                    <li>
	                    	<a href="${createLink(uri: '/pedido/compra')}"><i class="fa fa-shopping-cart"></i> Compra</a>
	                    </li>
	                    
	                    <g:if test="${session?.user?.role?.value == 'admin'}">
		                    <li>
		                        <a href="${createLink(uri: '/producto')}"><i class="fa fa-desktop"></i> Productos</a>
		                    </li>
		                    
		                    <li>
		                        <a href="${createLink(uri: '/user')}"><i class="fa fa-user"></i> Usuarios</a>
		                    </li>
		                    
		                    <li>
		                        <a href="${createLink(uri: '/pedido')}"><i class="glyphicon glyphicon-ok-sign"></i> Pedidos</a>
		                    </li>
		                    
		                    <li>
		                        <a href="${createLink(uri: '/descuento')}"><i class="fa fa-usd"></i> Descuentos</a>
		                    </li>
		                    
		                    <li>
		                        <a href="${createLink(uri: '/familia')}"><i class="fa fa-th-large"></i> Familias</a>
		                    </li>
		                    
		                    <li>
		                        <a href="${createLink(uri: '/marca')}"><i class="fa fa-barcode"></i> Marcas</a>
		                    </li>		                    		                    		                    

		                    <li>
		                        <a href="${createLink(uri: '/productoPedido')}"><i class="glyphicon glyphicon-earphone"></i> Productos Pedidos</a>
		                    </li>	
		                    
		                    <li>
		                        <a href="${createLink(uri: '/comercio')}"><i class="glyphicon glyphicon-map-marker"></i> Comercio</a>
		                    </li>		                    	                    		                    		                    
		                    		                    
		                </g:if>
		                    
                    
	                    <g:if test="${session?.user?.role?.value == 'user'}">
							 <li>
							 	<a href="${createLink(uri: '/pedido/indexPorUsuario')}"><i class="fa fa-barcode"></i> Pedidos realizados</a>
		                    </li>		                    
	                    </g:if>	                    
	                 </ul>
	                <!-- /#side-menu -->
	           </div>
	            <!-- /.sidebar-collapse --> 	            	
		</div>

	 	<!--<div class="container theme-showcase">-->   
	 		<div id="page-wrapper">
	 			<div class="row">
		 			<g:layoutBody/>
		 		</div>
		 	</div>
		<!--</div>-->   
	</div>
	

	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Core Scripts - Include with every page -->
    <script rel="stylesheet" href="${resource(dir: 'js', file: 'jquery-1.10.2.js')}" type="text/javascript"></script>
 	<script rel="stylesheet" href="${resource(dir: 'js', file: 'bootstrap.min.js')}" type="text/javascript"></script>
 	<script rel="stylesheet" href="${resource(dir: 'js/plugins/metisMenu', file: 'jquery.metisMenu.js')}" type="text/javascript"></script>		

    <!-- Page-Level Plugin Scripts - Dashboard -->   
    <script rel="stylesheet" href="${resource(dir: 'js/plugins/morris', file: 'raphael-2.1.0.min.js')}" type="text/javascript"></script>
    <script rel="stylesheet" href="${resource(dir: 'js/plugins/morris', file: 'morris.js')}" type="text/javascript"></script>

    <!-- SB Admin Scripts - Include with every page -->
    <script rel="stylesheet" href="${resource(dir: 'js', file: 'sb-admin.js')}" type="text/javascript"></script>

    <!-- Page-Level Demo Scripts - Dashboard - Use for reference -->
	<script rel="stylesheet" href="${resource(dir: 'js/demo', file: 'dashboard-demo.js')}" type="text/javascript"></script>
	
	<decorator:head />
	
	<!-- Se Agrega el urlHolder para que las funciones jquery puedan usar jstl -->
	<!-- <span id="urlHolder" style="display:none"><c:url value="/"/></span>
	
	 -->
	</body>
</html>